package userclient

import "github.com/spf13/cobra"

var confPath string

var RunCmd = &cobra.Command{
	Use:     "userrun",
	GroupID: "exec",
	Short:   "运行用户端连接软件",
	Run: func(cmd *cobra.Command, args []string) {
		LoadFromPath(confPath)
		instance := NewInstance(config)
		instance.Run()
	},

	Example: "portmap_linux_amd64 userrun -c userconf.yaml",
}

func init() {
	RunCmd.Flags().StringVarP(&confPath, "conf", "c", "", "指定运行的配置文件")
}
